<html>
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta charset="utf-8" />
	<script>
		window.addEventListener("load", function() {  
			const list=[
						{title:"图片转Pdf",src:"image2pdf.html"},
						{title:"Pdf转图片",src:"https://liangjintang.gitee.io/utils/pdf2image/web/viewer.html"},
						{title:"拆分Pdf",src:"pdf-split.html"},
                        {title:"合并Pdf",src:"pdf-merge.html"},
                        {title:"本地版",src:"pdftool-native.html"}];
			for(const item of list){
				//console.log(item);
				 var btn = document.createElement("Button");  
				 btn.innerHTML = item.title;  
				 btn.addEventListener('click', (e)=>{
					document.getElementById("iframe").src=item.src;
				 });
				 document.getElementById("menu").appendChild(btn); 
			}
			//var iframe = document.createElement("iframe"); 
			//iframe.id="iframe";
			document.getElementById("iframe").src="image2pdf.html";		
		});
	 </script>	
    <style type="text/css">
			#iframe {  
				border-color: transparent;  
				border-width: 0;  
			}
	</style>
	<title>Pdf工具</title>
  </head>
	<body>
		<br/>
		<div id="menu" width="100%"></div>
		<div>
			<iframe id="iframe" width="100%" height="600px"></iframe>
		</div>
    </body>
</html>